package com.example.project.entity;

import java.time.LocalDateTime;
import java.util.List;

import com.example.project.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 需求评论对象 t_issue_comment
 */
public class IssueComment extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/** 主键ID */
	private Long id;

	/** 需求ID */
	private Long issueId;

	/** 父评论ID，用于回复 */
	private Long parentId;

	/** 作者ID */
	private Long authorId;

	/** 作者姓名 */
	private String authorName;

	/** 评论内容 */
	private String content;

	/** 评论类型：0-普通评论，1-系统通知，2-状态变更 */
	private Integer commentType;

	/** 是否内部评论：0-公开，1-内部 */
	private Integer isInternal;

	/** 附件数量 */
	private Integer attachmentCount;

	/** 创建时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime createdTime;

	/** 更新时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime updatedTime;

	/** 删除标志：0-存在，1-删除 */
	private Integer delFlag;

	/** 关联信息 - 用户名 */
	private String userName;

	/** 关联信息 - 用户头像 */
	private String userAvatar;

	/** 关联信息 - 需求标题 */
	private String issueSubject;

	/** 关联信息 - 子评论列表 */
	private List<IssueComment> childComments;

	/** 回复评论列表 */
	private List<IssueComment> replies;

	/** 关联信息 - 附件列表 */
	private List<IssueCommentAttachment> attachments;

	// Getters and Setters
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getIssueId() {
		return issueId;
	}

	public void setIssueId(Long issueId) {
		this.issueId = issueId;
	}

	public Long getAuthorId() {
		return authorId;
	}

	public void setAuthorId(Long authorId) {
		this.authorId = authorId;
	}

	public String getAuthorName() {
		return authorName;
	}

	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Integer getCommentType() {
		return commentType;
	}

	public void setCommentType(Integer commentType) {
		this.commentType = commentType;
	}

	public Integer getIsInternal() {
		return isInternal;
	}

	public void setIsInternal(Integer isInternal) {
		this.isInternal = isInternal;
	}

	public Integer getAttachmentCount() {
		return attachmentCount;
	}

	public void setAttachmentCount(Integer attachmentCount) {
		this.attachmentCount = attachmentCount;
	}

	public LocalDateTime getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
	}

	public LocalDateTime getUpdatedTime() {
		return updatedTime;
	}

	public void setUpdatedTime(LocalDateTime updatedTime) {
		this.updatedTime = updatedTime;
	}

	public Integer getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(Integer delFlag) {
		this.delFlag = delFlag;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserAvatar() {
		return userAvatar;
	}

	public void setUserAvatar(String userAvatar) {
		this.userAvatar = userAvatar;
	}

	public String getIssueSubject() {
		return issueSubject;
	}

	public void setIssueSubject(String issueSubject) {
		this.issueSubject = issueSubject;
	}

	public List<IssueComment> getChildComments() {
		return childComments;
	}

	public void setChildComments(List<IssueComment> childComments) {
		this.childComments = childComments;
	}

	public List<IssueComment> getReplies() {
		return replies;
	}

	public void setReplies(List<IssueComment> replies) {
		this.replies = replies;
	}

	public List<IssueCommentAttachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<IssueCommentAttachment> attachments) {
		this.attachments = attachments;
	}
}